/*
 * @Description: 
 * @Version: 1.0
 * @Author: tao
 * @Date: 2021-02-23 22:39:47
 * @LastEditors: tao
 * @LastEditTime: 2021-02-24 14:43:43
 */
import {
    request
} from '../request'

// export function review(data) {
//     return request({
//         url: `,
//     })
// }


export function getDataByPageAndSize(page = 1, size = 10) {
    return request({
        url: `/stumatch/matchListBy`,
        params: {
            page,
            size
        },
        method: "GET"
    })
}

export function getDataByPageAndSizeUnCheck(page = 1, size = 10) {
    return request({
        url: `/stumatch/matchList`,
        params: {
            page,
            size
        },
        method: "GET"
    })
}

export function LikeSearch(name, page = 1, size = 10, type) {
    return request({
        url: `/stumatch/matchFind`,
        params: {
            name,
            page,
            size,
            type
        },
        method: "GET"
    })
}

export function editData(data) {
    return request({
        url: `/stumatch/matchEdit`,
        method: 'post',
        data
    })
}

export function deleteById(id) {
    return request({
        url: `/stumatch/matchDel`,
        params: {
            id
        },
        methods: "GET"
    })
}

export function Check(id, check) {
    return request({
        url: `/stumatch/matchCheck`,
        data: {
            id,
            check
        },
        method: "POST"
    })
}

export function appendData(data) {
    return request({
        url: `/stumatch/matchAdd`,
        method: 'post',
        data
    })
}

export function Excel( year ){
    return request({
        url: `/stumatch/matchOut`,
        method: 'get',
        params:{year},
        responseType: 'arraybuffer'
    })
}